<%--
  Created by IntelliJ IDEA.
  User: 67380
  Date: 2016/10/25
  Time: 8:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <link rel="stylesheet" href="/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/css/bootstrap-responsive.min.css" />
    <link rel="stylesheet" href="/css/colorpicker.css" />
    <link rel="stylesheet" href="/css/datepicker.css" />
    <link rel="stylesheet" href="/css/uniform.css" />
    <link rel="stylesheet" href="/css/select2.css" />
    <link rel="stylesheet" href="/css/matrix-style.css" />
    <link rel="stylesheet" href="/css/matrix-media.css" />
    <link rel="stylesheet" href="/css/bootstrap-wysihtml5.css" />
    <link href="/font-awesome/css/font-awesome.css" rel="stylesheet" />


    <style type="text/css">
        .datatablebtn{
            float: right;
            margin-top: 3px;
        }
        .controls input{
            height: 30px;
        }

    </style>
</head>
<body style="background-color: transparent">
<div class="widget-box">
    <div class="widget-title"> <span class="icon"> <i class="icon-align-justify"></i> </span>
        <h5>新增教师信息<span style="color: red">${error}</span></h5>
    </div>
    <div class="widget-content nopadding">
        <form action="/teainsert" method="post" class="form-horizontal">
            <div class="control-group">
                <label class="control-label">姓名 </label>
                <div class="controls">
                    <input type="text" class="span6" name="tname" value="${tea.tname}"  required/>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">工号 </label>
                <div class="controls">
                    <input type="text" class="span6 noedit" name="tid" value="${tea.tid}"  required />
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">专业 </label>
                <div class="controls">
                    <select name="tmajorId" id="smajorId"  style="width: 446px">
                        <c:forEach items="${majorList}" var="i">
                            <option value="${i.cmajorId}">${i.cname}(${i.college})</option>
                        </c:forEach>
                    </select>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">简介 </label>
                <div class="controls">
                    <textarea class="span6"   name="tintroduction">${tea.tintroduction}</textarea>
                </div>
            </div>

            <div class="form-actions">

                <button type="submit" class="btn btn-success edit">新增</button>

                <button type="button" class="btn btn-info" onclick="history.go(-1)">返回</button>
            </div>
        </form>
    </div>
</div>


</body>
<script src="/js/jquery.min.js"></script>
<script src="/js/jquery.ui.custom.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/jquery.uniform.js"></script>
<%--<script src="/js/select2.min.js"></script>--%>
<script src="/js/jquery.dataTables.min.js"></script>
<script src="/js/matrix.js"></script>
<script src="/js/matrix.tables.js"></script>

<script>

        $("#smajorId").val('${tea.tmajorId}');

    $('.stutable').dataTable({
        "bJQueryUI": true,
        "sPaginationType": "full_numbers",
        "sDom": '<""l>t<"F"fp>'
    });
    function excelimport() {
        $("#excelimport").click();

    }
    $("#excelimport").change(function () {
        $("#studentform button").click();
    })
    function reloadpwd(id) {
        if(confirm("确定重置密码嘛？")){
            $.ajax({
                url:"/teaReset",
                type:"post",
                data:{
                    sid:id
                },
                success:function (data) {
                    if(data=='1')
                        alert("重置密码成功")
                }
            })
        }
    }
</script>

</html>
